﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="List.aspx.cs" Inherits="Saker.Web.Boss.Sys.User.List" %>

<%@ Register Src="../../../Controls/Pager.ascx" TagName="Pager" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../../../Styles/global.css?v=1.0" rel="stylesheet" type="text/css" />
    <script src="../../../Scripts/jquery-1.6.2.min.js" type="text/javascript"></script>
    <script src="../../../Scripts/jquery.utils.js" type="text/javascript"></script>
    <script src="../../../Scripts/admin.js?v=1.0" type="text/javascript"></script>
    <script src="../../../Scripts/admin.ui.js?v=1.0" type="text/javascript"></script>
    <script type="text/javascript">
        admin.config.indexUrl = '/Boss/Main.aspx';
        var loading_img = "../../../images/loading_16x16.gif";

        // 只调用最顶的jBox
        if (top.jBox != undefined) {
            window.jBox = top.jBox;
        }

        top.orderChanged = false;
        function checkReload() {
            if (top.orderChanged) {
                top.orderChanged = false;
                goUrl(location.href);
            }
        }

        function checkAll(chk, id) {
            if (id == undefined)
                $("input[type='checkbox']").each(function () { this.checked = chk.checked; });
            else {
                $("#" + id + " input[type='checkbox']").each(function () { this.checked = chk.checked; });
            }
        }

        function goUrl(url) {
            top.admin.ui.goUrl(url);
            // 可能在jBox里点击跳转，同时关闭它
            jBox.close();
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div id="block-wp">
        <div class="search block">
            <div class="h">
                <span class="icon-sprite icon-magnifier"></span>
                <h3>
                    快速搜索</h3>
            </div>
            <div class="tl corner">
            </div>
            <div class="tr corner">
            </div>
            <div class="bl corner">
            </div>
            <div class="br corner">
            </div>
            <div class="cnt-wp">
                <div class="cnt">
                    <div class="search-bar">
                        <label class="first txt-green">
                            用户名：</label>
                        <label class="txt-green">
                            性别：</label>
                        <label class="txt-green">
                            状态：</label>
                        <label class="txt-green">
                            每页：</label>
                        <label>
                            <asp:LinkButton ID="lbtnSearch" CssClass="btn-lit btn-middle" runat="server"><span>搜索</span></asp:LinkButton></label>
                    </div>
                </div>
            </div>
        </div>
        <div class="block-sep">
        </div>
        <div class="block">
            <div class="h">
                <span class="icon-sprite icon-list"></span>
                <h3>
                    用户列表</h3>
                <div class="bar">
                    <a class="btn-lit" href="javascript:goUrl('Sys/User/Add.aspx');"><span>新增</span></a>
                    <asp:LinkButton CssClass="btn-lit" ID="lbtnDelete" runat="server"><span>删除选中</span></asp:LinkButton>
                </div>
            </div>
            <div class="tl corner">
            </div>
            <div class="tr corner">
            </div>
            <div class="bl corner">
            </div>
            <div class="br corner">
            </div>
            <div class="cnt-wp">
                <div class="cnt">
                    <table class="data-table" width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tbody>
                            <tr>
                                <th scope="col">
                                    <input value="true" type="checkbox" title="全选/不选" onclick="checkAll(this);" name="CheckAll"
                                        id="CheckAll" />
                                </th>
                                <th scope="col">
                                    用户
                                </th>
                                <th scope="col">
                                    姓名
                                </th>
                                <th scope="col">
                                    状态
                                </th>
                                <th scope="col">
                                    登录限制
                                </th>
                                <th scope="col">
                                    个人角色
                                </th>
                                <th scope="col">
                                    编辑
                                </th>
                                <th scope="col">
                                    删除
                                </th>
                            </tr>
                            <asp:Repeater ID="RepUserList" runat="server" 
                                onitemcommand="RepUserList_ItemCommand">
                                <ItemTemplate>
                                    <tr>
                                        <td class="chk c">
                                            <asp:CheckBox ID="checkBox" runat="server" />
                                        </td>
                                        <td class="txt160 c">
                                            <%#Eval("UserName")%>
                                        </td>
                                        <td class="txt160 c">
                                            <%#Eval("RealName")%>
                                        </td>
                                        <td class="txt80 c">
                                            <%#Eval("Status")%>
                                        </td>
                                        <td class="txt80 c">
                                            <%#Eval("IsLimit")%>
                                        </td>
                                        <td class="txt80 c">
                                            <%#Eval("RoleID")%>
                                        </td>
                                        <td class="icon">
                                            <asp:LinkButton CssClass="opt" ID="lbtnEdit" CommandArgument='<%#Eval("UserID")%>' CommandName="EditUser" runat="server"><span class="icon-sprite icon-edit"></span> </asp:LinkButton>
                                        </td>
                                        <td class="icon tail">
                                            <asp:LinkButton CssClass="opt" ID="lbtnDel" CommandArgument='<%#Eval("UserID")%>' CommandName="DeleteUser" runat="server" OnClientClick="JavaScript:return confirm('你确定要删除该用户吗？');"><span class="icon-sprite icon-delete"></span></asp:LinkButton>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                            </asp:Repeater>
                        </tbody>
                    </table>
                </div>
                <uc1:Pager ID="UserPager" runat="server" OnPageChanged="BindData" PageSize="12" />
            </div>
        </div>
    </div>
    <!--#wp-->
    </form>
</body>
</html>
